﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Collections;
using EZCRS.HCMS.Entity;
using EZCRS.HCMS.SqlClient;
using EZCRS.HCMS.Bll;

namespace EZCRS.HCMS.Bll.baseinfo
{
    public enum enumlanguage { 中文,英文}
    public class HotelBaseInfo
    {
        public static int j = 1;//中文

        public static string charterrormsg = "<font style=\"color:red;font-size:14px;font-weight:blod\">图表生成错误，请稍候再试！</font>";

        /// <summary>
        /// 初始化j
        /// </summary>
        public static void InitJ()
        {
            if (CFun.GetCurrentLanguage() == "en-US")
                j = 2;//英文
            else
                j = 1;
        }

        /// <summary>
        /// 国际时区
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> TimeZone()
        {
            List<dropdowndata> items = new List<dropdowndata>();
            #region
            items.Add(new dropdowndata("CCT", "GMT +0800: Beijing, Hong Kong, Urumqi"));
            items.Add(new dropdowndata("IDL", "GMT -1200: International Date Line West"));
            items.Add(new dropdowndata("MIS", "GMT -1100: Midway Island, Samoa"));
            items.Add(new dropdowndata("HST", "GMT -1000: Hawaii"));
            items.Add(new dropdowndata("YST", "GMT -0900: Alaska"));
            items.Add(new dropdowndata("PST", "GMT -0800: Pacific Time (US & Canada)"));
            items.Add(new dropdowndata("ARI", "GMT -0700: Arizona"));
            items.Add(new dropdowndata("CHI", "GMT -0700: Chihuahua, La Paz, Mazatlan"));
            items.Add(new dropdowndata("MST", "GMT -0700: Mountain Time (US & Canada)"));
            items.Add(new dropdowndata("CEN", "GMT -0600: Central America"));
            items.Add(new dropdowndata("CST", "GMT -0600: Central Time (US & Canada)"));
            items.Add(new dropdowndata("MEX", "GMT -0600: Mexico City, Monterrey"));
            items.Add(new dropdowndata("SAS", "GMT -0600: Saskatchewan"));
            items.Add(new dropdowndata("BAG", "GMT -0500: Bogota, Lima, Quito"));
            items.Add(new dropdowndata("EST", "GMT -0500: Eastern Time (US & Canada)"));
            items.Add(new dropdowndata("IND", "GMT -0500: Indiana (East)"));
            items.Add(new dropdowndata("AST", "GMT -0400: Atlantic Time (Canada)"));
            items.Add(new dropdowndata("CAR", "GMT -0400: Caracas, La Paz"));
            items.Add(new dropdowndata("SAN", "GMT -0400: Santiago"));
            items.Add(new dropdowndata("NST", "GMT -0330: Newfoundland"));
            items.Add(new dropdowndata("BRA", "GMT -0300: Brasilia"));
            items.Add(new dropdowndata("BST", "GMT -0300: Buenos Aires, Georgetown"));
            items.Add(new dropdowndata("GST", "GMT -0300: Greenland"));
            items.Add(new dropdowndata("MAT", "GMT -0200: Mid-Atlantic"));
            items.Add(new dropdowndata("AZT", "GMT -0100: Azores"));
            items.Add(new dropdowndata("WAT", "GMT -0100: Cape Verde Island"));
            items.Add(new dropdowndata("WET", "GMT 0000: Casablanca, Monrovia"));
            items.Add(new dropdowndata("GMT", "GMT 0000: Greenwich Mean Time"));
            items.Add(new dropdowndata("CET", "GMT +0100: Berlin, Bern, Rome, Vienna"));
            items.Add(new dropdowndata("EET", "GMT +0100: Belgrade, Budapest, Prague"));
            items.Add(new dropdowndata("BRU", "GMT +0100: Brussels, Madrid, Paris"));
            items.Add(new dropdowndata("SAR", "GMT +0100: Sarajevo, Warsaw, Zagreb"));
            items.Add(new dropdowndata("WCA", "GMT +0100: West Central Africa"));
            items.Add(new dropdowndata("ATH", "GMT +0200: Athens, Beirut, Istanbul, Minsk"));
            items.Add(new dropdowndata("BUC", "GMT +0200: Bucharest"));
            items.Add(new dropdowndata("CAI", "GMT +0200: Cairo"));
            items.Add(new dropdowndata("HAR", "GMT +0200: Harare, Pretoria"));
            items.Add(new dropdowndata("HEL", "GMT +0200: Helsinki, Kyiv, Riga, Sofia"));
            items.Add(new dropdowndata("JER", "GMT +0200: Jerusalem"));
            items.Add(new dropdowndata("BGT", "GMT +0300: Baghdad"));
            items.Add(new dropdowndata("KUW", "GMT +0300: Kuwait, Riyadh"));
            items.Add(new dropdowndata("MOS", "GMT +0300: Moscow, St. Petersburg"));
            items.Add(new dropdowndata("NAI", "GMT +0300: Nairobi"));
            items.Add(new dropdowndata("IRT", "GMT +0330: Tehran"));
            items.Add(new dropdowndata("ABU", "GMT +0400: Abu Dhabi, Muscat"));
            items.Add(new dropdowndata("ZP4", "GMT +0400: Baku, Tbilisi, Yerevan"));
            items.Add(new dropdowndata("KAB", "GMT +0430: Kabul"));
            items.Add(new dropdowndata("EKA", "GMT +0500: Ekaterinburg"));
            items.Add(new dropdowndata("ZP5", "GMT +0500: Islamabad, Karachi, Tashkent"));
            items.Add(new dropdowndata("IST", "GMT +0530: Chennai, Mumbai, New Delhi"));
            items.Add(new dropdowndata("KAT", "GMT +0545: Kathmandu"));
            items.Add(new dropdowndata("ZP6", "GMT +0600: Almaty, Novosibirsk"));
            items.Add(new dropdowndata("DHA", "GMT +0600: Astana, Dhaka"));
            items.Add(new dropdowndata("SRI", "GMT +0600: Sri Jayawardenepura"));
            items.Add(new dropdowndata("RAN", "GMT +0630: Rangoon"));
            items.Add(new dropdowndata("SST", "GMT +0700: Bankok, Hanoi, Jakarta"));
            items.Add(new dropdowndata("KRA", "GMT +0700: Krasnoyarsk"));
            items.Add(new dropdowndata("IRK", "GMT +0800: Irkutsk, Ulaan Bataar"));
            items.Add(new dropdowndata("KUA", "GMT +0800: Kuala Lumpur, Singapore"));
            items.Add(new dropdowndata("PER", "GMT +0800: Perth"));
            items.Add(new dropdowndata("TAI", "GMT +0800: Taipei"));
            items.Add(new dropdowndata("JST", "GMT +0900: Osaka, Sapporo, Tokyo"));
            items.Add(new dropdowndata("KST", "GMT +0900: Seoul"));
            items.Add(new dropdowndata("YAK", "GMT +0900: Yakutsk"));
            items.Add(new dropdowndata("ADE", "GMT +0930: Adelaide"));
            items.Add(new dropdowndata("DAR", "GMT +0930: Darwin"));
            items.Add(new dropdowndata("BRI", "GMT +1000: Brisbane"));
            items.Add(new dropdowndata("CAN", "GMT +1000: Canberra, Melbourne, Sydney"));
            items.Add(new dropdowndata("GUA", "GMT +1000: Guam, Port Moresby"));
            items.Add(new dropdowndata("HOB", "GMT +1000: Hobart"));
            items.Add(new dropdowndata("VLA", "GMT +1000: Vladivostok"));
            items.Add(new dropdowndata("MAG", "GMT +1100: Solomon Island, New Caledonia"));
            items.Add(new dropdowndata("NZT", "GMT +1200: Auckland, Wellington"));
            items.Add(new dropdowndata("FIJ", "GMT +1200: Fiji, Kamchatka, Marshall Islands"));
            items.Add(new dropdowndata("NUK", "GMT +1300: Nuku'alofa"));
            #endregion
            return items;
        }

        /// <summary>
        /// 酒店星级
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> StarRate()
        {
             List<dropdowndata> items = new List<dropdowndata>();

            InitJ();
            j--;
            items.Add(new dropdowndata("", new object[] { "--", "All" }[j].ToString()));
            items.Add(new dropdowndata("0", new object[] { "经济型", "All" }[j].ToString()));
            items.Add(new dropdowndata("1", new object[] { "1星", "1 star" }[j].ToString()));
            items.Add(new dropdowndata("2", new object[] { "2星", "2 star" }[j].ToString()));
            items.Add(new dropdowndata("3", new object[] { "3星", "3 star" }[j].ToString()));
            items.Add(new dropdowndata("4", new object[] { "4星", "4 star" }[j].ToString()));
            items.Add(new dropdowndata("5", new object[] { "5星", "5 star" }[j].ToString()));

            return items;
        }

        /// <summary>
        /// 酒店准星级
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> DiamondRate()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            InitJ();
            j--;
            items.Add(new dropdowndata("", new object[] { "--", "--" }[j].ToString()));
            items.Add(new dropdowndata("1", new object[] { "准1星", "1 star" }[j].ToString()));
            items.Add(new dropdowndata("2", new object[] { "准2星", "2 star" }[j].ToString()));
            items.Add(new dropdowndata("3", new object[] { "准3星", "3 star" }[j].ToString()));
            items.Add(new dropdowndata("4", new object[] { "准4星", "4 star" }[j].ToString()));
            items.Add(new dropdowndata("5", new object[] { "准5星", "5 star" }[j].ToString()));

            return items;
        }

        /// <summary>
        /// 星期
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> Weebly()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            InitJ();
            j--;
            items.Add(new dropdowndata("0", new object[] { "星期日", "Sunday" }[j].ToString()));
            items.Add(new dropdowndata("1", new object[] { "星期一", "Monday" }[j].ToString()));
            items.Add(new dropdowndata("2", new object[] { "星期二", "Tuesday " }[j].ToString()));
            items.Add(new dropdowndata("3", new object[] { "星期三", "Wednesday" }[j].ToString()));
            items.Add(new dropdowndata("4", new object[] { "星期四", "Thursday" }[j].ToString()));
            items.Add(new dropdowndata("5", new object[] { "星期五", "Friday" }[j].ToString()));
            items.Add(new dropdowndata("6", new object[] { "星期六", "Saturday" }[j].ToString()));

            return items;
        }

        /// <summary>
        /// 酒店入住时间
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> DayHour()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            string hour = "";
            for (int i = 1; i < 24; i++)
            {
                hour = i.ToString();
                if (i < 10)
                    hour = "0"+i.ToString();
                items.Add(new dropdowndata(hour, hour+":00"));
            }
            return items;
        }

        /// <summary>
        /// 酒店方位
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> AirPortLocal()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            items.Add(new dropdowndata("e", "东"));
            items.Add(new dropdowndata("w", "西"));
            items.Add(new dropdowndata("s", "南"));
            items.Add(new dropdowndata("n", "北"));
            items.Add(new dropdowndata("es", "东南"));
            items.Add(new dropdowndata("en", "东北"));
            items.Add(new dropdowndata("ws", "西南"));
            items.Add(new dropdowndata("wn", "西北"));
           
            return items;
        }

        /// <summary>
        /// 距离单位
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> TrafficUnit()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            items.Add(new dropdowndata("km", "公里"));

            return items;
        }

        /// <summary>
        /// 酒店交通 机场出行方式
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> AirPortTraffic()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            items.Add(new dropdowndata("H", "酒店礼宾车"));
            items.Add(new dropdowndata("S", "地铁"));
            items.Add(new dropdowndata("P", "公共交通"));
            items.Add(new dropdowndata("C", "租赁车"));
            items.Add(new dropdowndata("L", "豪华轿车"));
            items.Add(new dropdowndata("W", "步行"));
            items.Add(new dropdowndata("B", "公交汽车"));
            items.Add(new dropdowndata("R", "火车"));
            items.Add(new dropdowndata("T", "出租车"));
            items.Add(new dropdowndata("O", "其他"));
            
            return items;
        }

        /// <summary>
        /// 周数据
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> Weekly()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            items.Add(new dropdowndata("0", "周日"));
            items.Add(new dropdowndata("1", "周一"));
            items.Add(new dropdowndata("2", "周二"));
            items.Add(new dropdowndata("3", "周三"));
            items.Add(new dropdowndata("4", "周四"));
            items.Add(new dropdowndata("5", "周五"));
            items.Add(new dropdowndata("6", "周六"));

            return items;
        }
        /// <summary>
        /// 酒店状态
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> HotelStatus()
        {
            List<dropdowndata> items = new List<dropdowndata>();

            items.Add(new dropdowndata("1", "可用"));
            items.Add(new dropdowndata("0", "禁用"));

            return items;
        }

        /// <summary>
        /// 所有国家
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> HCountry()
        {
            InitJ();
            j--;
            List<HCRS_Country> _h = new sql_hcrs_country().getcountry(j);
            List<dropdowndata> items = new List<dropdowndata>();


            foreach(HCRS_Country _country in _h)
            items.Add(new dropdowndata(_country.code, _country.countryname));

            return items;
        }

        /// <summary>
        /// 所有酒店类别
        /// </summary>
        /// <returns></returns>
        public static List<dropdowndata> HProptype()
        {
            InitJ();
            j--;
            List<HCRS_Proptype> _h = new sql_hcrs_proptype().getallproptype(j);
            List<dropdowndata> items = new List<dropdowndata>();

            foreach(HCRS_Proptype _prop in _h)
                items.Add(new dropdowndata(_prop.propcode,_prop.propname));

            return items;
        }
    }
}
